package com.mrent.web.controller.front;

import java.util.List;

import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import com.mrent.entity.OrderGoods;
import com.mrent.service.OrderGoodsService;
import com.mrent.util.RenderUtil;

@Controller
public class OrderGoodsController {
	
	@Autowired
	private OrderGoodsService  orderGoodsService;
	
	/**
	 * 订单商品输出.
	 * 
	 * @return
	 */
	@RequestMapping("/order/goods/{orderNo}")
	public String renderOrderGoods(@PathVariable String orderNo,HttpServletResponse response){
		List<OrderGoods> goods = orderGoodsService.listOrderGoods(orderNo);
		RenderUtil.renderJson(goods,response);
		return null;
	}

}
